home *** CD-ROM | disk | FTP | other *** search
/ System Booster / System Booster.iso / Archives / StartupTools / setman10g.readme < prev    next >
Text File  |  1996-09-26  |  6KB  |  159 lines

  1. Short: Patches SetFunction() to new better one.
  2. Uploader: mbars@bluejay.creighton.edu
  3. author: mc6489@mclink.it
  4.  
  5.  
  6.  
  7.                                SetFunction Manager
  8.  
  9.                              SetMan / SetManager V1.0
  10.  
  11.  
  12.   Copyright © 1991,1992 by
  13.  
  14.   Nicola Salmoria
  15.   Via Piemonte 11
  16.   53100 Siena ITALY
  17.  
  18.   Internet: mc6489@mclink.it
  19.  
  20.  
  21. This program is FREEWARE. It is NOT, and will never be, public domain.
  22. Copy it as much as you can (provided no charge is made and the archive is left
  23. intact). It cannot be included in any commercial program without the written
  24. permission of the author.
  25.  
  26.  
  27.  
  28. NOVICE USERS
  29. ------------
  30. The program 'SetMan' should be put in C: and executed as the first command in
  31. the startup-sequence. When I say first, I mean FIRST!!  Run it even before
  32. SetPatch.
  33.  
  34. If you're not expert with the Amiga operating system, all you need to know about
  35. SetMan is that it will, under certain circumstances, avoid GURUs. Read on for
  36. more infos.
  37.  
  38.  
  39.  
  40. EXPERT USERS
  41. ------------
  42. Let's go into details. There's a function in exec.library, whose name is
  43. SetFunction(). You know that Amiga libraries contain a 'jump table', where are
  44. stored the addresses of every function in the library. Library functions are
  45. always executed via the jump table, and NEVER through absolute addressing.
  46. SetFunction() allows the user to modify the jump table, in order to insert a
  47. custom routine in place of the standard one.
  48. For example, one could modify the DisplayBeep() vector to play a sound instead
  49. of flashing the screen.
  50.  
  51. SetFunction() is a very useful feature of the Amiga operating system, but it has
  52. the major drawback that there's no system supervising of concurrent use of the
  53. same vector by different tasks. Under certain circumstances, that can be deadly.
  54. Before removing its custom vector, a program should check that it was not
  55. modified again. However, very few do that, and so if you do not terminate such
  56. program in REVERSE order of when you executed them, you'll probably get a system
  57. crash.
  58.  
  59. Another fault of KickStart 1.x is that the dos.library vectors cannot be
  60. modified by SetFunction(), 'cos they do not follow the conventions estabilished
  61. by Commodore itself.
  62.  
  63. SetMan modifies the SetFunction() vector, and inserts a custom routine which
  64. solves both of the previous problems. It keeps a linked list of all changes to
  65. the jump tables, and allows any program to remove its vector at any time.
  66. Moreover, it allows to modify dos.library vectors in a transparent, upward
  67. compatible, way.
  68.  
  69.  
  70. In this archive there's another free gift, whose name is SetManager. SetManager
  71. displays the list of all modified vectors, with the name of the program which
  72. inserted a custom routine, the address of that routine, and the current status.
  73. Status will usually be 'active'; if you click on the function name, you can
  74. disable it, thus removing the custom function. The third possible state is
  75. 'removed', which only occurs when you don't quit programs in the correct order
  76. I explained later. It's there for your information, but is absolutely no
  77. problem. When you exit the other program which uses the same vector, both will
  78. disappear from the list.
  79.  
  80. NOTE: modified vectors are shown as 'offset' 'library name'. However, SetManager
  81. is able to read the standard 'xxx_lib.fd' files, provided by Commodore on the
  82. 'Extras' disk. just assign the name 'FD:' to a directory containing the .fd
  83. files, and they will be read and interpreted when you load SetManager. That way,
  84. you will get the true function names, instead of offsets.
  85.  
  86.  
  87.  
  88. PROGRAMMERS
  89. -----------
  90. You are strongly suggested to use SetMan facilities to modify the dos.library
  91. vectors.
  92. To know if SetMan is running, all you have to do is search for a public MsgPort
  93. named "SetMan". You need that only under KickStart 1.x, 'cos since version 2.0
  94. of the operating system dos.library has joined the rest of us. However, SetMan
  95. is smart enough to use the custom routine for dos.library only if it's really
  96. the non-standard one.
  97. Here is an example of how to proceed:
  98.  
  99. -----------------------
  100.  
  101. if (DOSBase->dl_lib.lib_Version < 36 && !FindPort("SetMan"))
  102. {
  103.       printf("You need SetMan to execute this program!\n");
  104.       exit(RETURN_WARN);
  105. }
  106. else
  107. {
  108.       TrueFunction = SetFunction((struct Library *)DOSBase,FUNCOFFSET,NewFunction);
  109.  
  110.       etc etc.....
  111. }
  112.  
  113. -----------------------
  114.  
  115.  
  116.  
  117. BUGS AND INCOMPATIBILITIES
  118. --------------------------
  119. There are no known bugs in this version of SetMan.
  120.  
  121. A few more words should be spent on compatibility problems.
  122. Due to the very different procedures followed by the original SetFunction() and
  123. by SetMan, it's not possible to guarantee a 100% compatibility with every
  124. program around. Every effort has been made to avoid every possible problem;
  125. SetMan handles correctly every strange behaviour I could think about; the only
  126. way to confuse SetMan should be using two differnt programs communicating
  127. through a message port and doing very strange things. I'm almost sure such
  128. things things should never happen.
  129.  
  130. I've encountered a problem with a program called 'TurboTopaz', which refuses to
  131. quit saying that 'Vector has been changed'. That's true, 'cos SetMan puts a
  132. function of its own ahead of the custom one; if TurboTopaz used SetFunction(),
  133. it would receive in return the value it expects, but it reads directly the jump
  134. table, something I believe is not supported by Commodore.
  135.  
  136. I use a lot of programs which call SetFunction(), and none of them has problems
  137. with SetMan.
  138.  
  139.  
  140.  
  141. ACKNOWLODGEMENT
  142. ---------------
  143. I'd like to thank Marco Ciuchini who pointed out an important incompatibility
  144. problem which I have been able to completely remove.
  145.  
  146.  
  147. ============================= Archive contents =============================
  148.  
  149. Original  Packed Ratio    Date     Time    Name
  150. -------- ------- ----- --------- --------  -------------
  151.     1920     913 52.4% 27-Jun-93 22:11:12  SetMan10g/changes.doc
  152.     1872    1297 30.7% 26-Jun-93 14:57:18  SetMan10g/SetMan
  153.     5504    2565 53.3% 11-Nov-92 20:59:18  SetMan10g/setman.doc
  154.     6121    2743 55.1% 11-Nov-92 20:58:48  SetMan10g/setman.ita
  155.     7848    4383 44.1% 11-Nov-92 20:43:38  SetMan10g/SetManager
  156.     2724    1468 46.1% 11-Nov-92 21:18:48  SetMan10g/SetManager.info
  157. -------- ------- ----- --------- --------
  158.    25989   13369 48.5% 20-Apr-94 11:26:56   6 files
  159.